<template>
    <van-skeleton title :row="3" v-show="status" />
    <van-nav-bar title="商品详情" left-text="返回" left-arrow @click-left="onClickLeft" />
    <div v-html="detailApiData.goods_introduce"></div>
    <Swip></Swip>
    <van-action-bar>
        <van-action-bar-icon icon="chat-o" text="客服" @click="onClickIcon" />
        <van-action-bar-icon icon="cart-o" text="购物车" @click="onClickIcon" />
        <van-action-bar-icon icon="shop-o" text="店铺" @click="onClickIcon" />
        <van-action-bar-button type="danger" text="立即结算" @click="onClickButton" />
    </van-action-bar>

</template>

<script setup>
import { detailApi } from '@/api/api';
import Swip from '@/components/swip.vue';
import router from '@/router';
import { ref } from 'vue';
import { useRoute } from 'vue-router';

let route = useRoute()
let detailApiData = ref([])
detailApi(route.params.goods_id).then(res => {
    console.log(res);
    detailApiData.value = res.data.message

})
const onClickButton=()=>{
    router.push('/orderdelit')
}
const status = ref(true)
setTimeout(() => {
    status.value = false
}, 2000);
</script>

<style lang="scss" scoped></style>